﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using LogManager.ViewModels.Filter;
using System.Text;
using System.Web.Routing;

namespace LogManager.Helpers
{
    public static class CustomHtmlHelper
    {
        public static DatePager DatePager(this HtmlHelper helper,string serverName = null,string logName = null)
        {
            return new DatePager(helper.ViewContext,serverName,logName);
        }

        public static string Truncate(this HtmlHelper helper, string str, int length)
        {
            if (!string.IsNullOrEmpty(str) && str.Length > length)
                return str.Substring(0, length) + "...";
            return str;
        }        
    }    
}